This invention relates to a control apparatus for a vending machine, and more particularly to a control apparatus for a vending machine having a main control unit and sub-control units to which a new function can be incorporated or a new sub control unit can be added with reduced costs.
A vending machine is controlled by a control apparatus consisting of a main control unit and some sub-control units. Sub-control units include a sales control unit for controlling the article-handling system, a display control unit for controlling displays, display lamps, article-selecting buttons and so on, and a money handling unit in the vending machine. Main control unit controls these sub-control units generally.
FIG. 1 shows an example of conventional vending machine. Main control unit 101 which controls sub-control units 102A to 102D is operated by main control program PM stored in main control memory 111. Specific main control programs PMA to PMD specified for sub-control units 102A to 102D, respectively, are incorporated in main control program PM in order to control sub-control units 102A to 102D.
There are various kinds of vending machine, for example, one for serving 20 kinds of available articles and another for serving 30 kinds. Data DA to DD for setting column number, relay number, number of selection buttons, etc. are held in main control unit 101 as a part of main control program PM according to the type of vending machines, in order to control the vending machine in accordance with the number of kinds of available articles.
When, for example, a type of machine for serving 30 kinds of articles has to be developed following that for serving 20 kinds of articles, replacement of main control memory 111 which is a FROM for storing data DA to DD set for controlling the sub-control units is required. To cope with this problem, a control apparatus for vending machine as explained below is proposed in Japanese Patent Application Laid Open No.Hei9-128604.
FIG. 2 shows another example of conventional control apparatus for a vending machine. Setting data specified to each part of the vending machine are held in each sub-control unit controlling the respective part. Main control unit 201 receives set data DA to DD from respective sub-control units 202A to 202D to control the vending machine. Main control program PM includes specific main control programs PMA to PMD specified to sub-control units 202A to 202D, respectively, to control respective sub-control units. Thereby, only changing of the sub-control units that concern the required change in the machine is required in place of replacing main control memory 211 which is a ROM.
When a new function is to be supplemented to the sub-control units in these conventional control aparatuses for vending machine, a new main control program has to be created so as to involve the new function because a conventional main control program does not involve any portion available to deal with the new function, whereby a serious problem is caused.
For example, when a power-saving function is to be supplemented to the sales control units in the conventional control apparatus for a vending machine, a process or processes to save power have to be added not only to the control program of the sales control unit, one of the sub-control units, but also to the portion of main program specified to the sales control unit. The power-saving processes, such as a process to put out the fluorescent lamps at a predetermined time and a process to prolong the interval of operation of the refrigerator for cooling the articles, have to be added to the control program of the sales control unit. The power-saving processes, such as a process to determine whether power for the fluorescent lamps should be saved or not and a process to determine at what temperature or below in the environment the power for the refrigerator should be saved, have to be added to the portion of main program specified to the sales control unit. Therefore, not only the control program for the sales control unit, one of the sub-control units, but also the control program for the main control unit must be renewed to add the power-saving processes, resulting in replacement of the ROM for storing the latter program.
Accordingly, it is an object of the invention to provide a control apparatus for a vending machine free from the necessity of replacing the main program when a new function is to be supplemented to the sub-control units in the control apparatus, removing the necessity of replacing parts and software in the main control unit, whereby costs and labor can be reduced.
It is another object of the invention to provide a control apparatus for a vending machine free from the necessity of replacing the main program when another sub-control unit is to be added to the sub-control units in the control apparatus, removing the necessity of replacing parts and software in the main control unit, whereby costs and labor can be reduced.
According to the first feature of the invention, a control apparatus for a vending machine comprises:
a main control unit operated by a main control program, at least a part of the main control program being stored in the main control unit; and
sub-control units controlled generally by the main control unit;
the main control program including data specifically set for each of the sub-control units; wherein:
the data specifically set for a particular sub-control unit are stored in the particular sub-control unit; and
a part of the main control program for controlling specifically the particular sub-control unit is stored in the particular sub-control unit.
According to the second feature of the invention, a control apparatus for a vending machine comprises:
a main control unit operated by a main control program, a first part of the main control program being stored in the main control unit; and
sub-control units controlled generally by the main control unit;
the main control program including data specifically set for each of the sub-control units; wherein:
the data specifically set for a particular sub-control unit are stored in the particular sub-control unit;
a second part of the main control program for controlling specifically the particular sub-control unit is stored in the particular sub-control unit; and
the second part of the main control program is supplemented to the first part of the main control program stored in the main control unit by loading the main control unit with the second part when the particular sub-control unit is connected with the main control unit.
According to the second feature of the invention, once the sub-control unit is connected to the main control unit, the part of main control program stored in the particular sub-control unit is incorporated into the main control program stored in the main control unit, thereby control can be executed in the same manner as the case where the part of main control program is stored therein from the start.